document.getElementById('receiveBtn').onclick = function () {
    var mobile = document.getElementById('mobile').value;
    var type = document.getElementById('type').value;
    var num = document.getElementById('alcoholNum').value;
    if (num == null || num == '' || num == 0) {
        mui.alert('领取数量不正确', '提示', function () {
        });
        return;
    }
    mui.ajax('/admin/getUserByMobile', {
        data: {
            mobile: mobile
        },
        type: 'post',//HTTP请求类型
        success: function (data) {
            if (data.code > 0) {
                location.href = "/admin/makesureWine?mobile=" + mobile + "&type=" + type + "&num=" + num;
            } else {
                mui.alert(data.msg, '提示');
            }
            console.log(data);
        },
        error: function (data) {
            console.log('data', data);
        }

    });

//     mui.ajax('/admin/makesureWine',{
//         data:{
//             mobile: mobile,
//             type: type,
//             num:num
//         },
//         type:'post',//HTTP请求类型
//         success:function(data){
//             console.log(data);
//         },
//         error:function(data){
//             console.log('data',data);
//         }
//     });
}

// function  selectChange() {
//     var receiveType = document.getElementById('receiveType').value;
//     if(receiveType==1){
//         document.getElementById('alcoholNum').value=1;
//         document.getElementById('alcoholNum').setAttribute("readonly","true");
//     }else {
//         document.getElementById('alcoholNum').value='';
//         document.getElementById('alcoholNum').removeAttribute("readonly");
//     }
// }